#include <bits/stdc++.h>
using namespace std;
int mp[205][205];
int n, x, y, num;
int main(){
    cin >> n;
    x = 1, y = 1, num = 0;
    int s;
    while (cin >> s){
        for (int i = 1; i <= s; i++){
            mp[x][y] = num;
            y++;
            if (y > n){
                x++, y = 1;
            }
        }
        num = 1 - num;
    }
    for (int i = 1; i <= n; i++){
        for (int j = 1; j <= n; j++){
            cout << mp[i][j];
        }
        cout << endl;
    }
    return 0;
}